package cn.monkey.transport.core;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.function.Predicate;

public interface Inbound {

    Mono<Void> close();

    <T> Flux<T> receive(Class<T> clazz, Predicate<T> p);

    default <T> Flux<T> receive(Class<T> clazz) {
        return this.receive(clazz, t -> true);
    }
}
